package business.article.interfaces;

import java.util.ArrayList;

import dbExceptions.BadComboException;
import dbExceptions.DataBaseErrorException;
import dbExceptions.MissingComboException;
import article.entities.ArticleVO;
import article.entities.CategoryVO;
import article.entities.ComboVO;
import article.entities.IngredientVO;
import article.exceptions.BadArticleException;
import article.exceptions.BadCategoryException;
import article.exceptions.IncompleteArticleException;
import article.exceptions.MissingArticleException;
import article.exceptions.MissingCategoryException;
import article.exceptions.NotHereException;

public interface ArticleMgt {

	// Article
	void addArticle(ArticleVO artNew) throws IncompleteArticleException,
			MissingCategoryException, DataBaseErrorException,
			BadCategoryException, MissingArticleException;

	void updateArticle(ArticleVO artUpt) throws NotHereException,
			IncompleteArticleException, MissingCategoryException,
			DataBaseErrorException, BadCategoryException,
			MissingArticleException, BadArticleException;

	void deleteArticle(ArticleVO artDel) throws NotHereException,
			MissingArticleException, BadArticleException,
			DataBaseErrorException;

	ArticleVO[] getArticles(); //devuelve solo los articles - no combos
	
	ArrayList<ArticleVO> getAllArticles();

	// Ingredient
	IngredientVO[] getAllIngredients();

	IngredientVO[] getInStockIngredients();

	IngredientVO[] getOutStockIngredients();

	void addOutOfStock(ArrayList<IngredientVO> ingredientes);

	void addInStock(ArrayList<IngredientVO> ingredientes);

	void newIngredient(String name);

	// Category
	CategoryVO[] getCategories();

	void newCategory(String name);

	// Combo
	ComboVO[] getComos();

	void newCombo(ComboVO comb) throws MissingCategoryException,
			MissingComboException, BadCategoryException;

	void deleteCombo(ComboVO comb) throws MissingArticleException,
			BadArticleException, DataBaseErrorException;

	void updateCombo(ComboVO comb) throws MissingComboException,
			BadComboException, BadCategoryException, MissingCategoryException,
			DataBaseErrorException;

}
